]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Give the active page key focus when it is shown
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 4 Nov 2013 22:23:28 +0000 (17:23 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 4 Dec 2013 16:22:55 +0000 (11:22 -0500)
Rather than implement special focus policies like only allowing keynav
when pressing down, simply give the active page key focus when entering
the overview.

This may break stuff, as it's somewhat of a tricky patch to get right.
Testing this one would be super appreciated.

https://bugzilla.gnome.org/show_bug.cgi?id=644306

js/ui/viewSelector.js

index 0bc0f20af2f09e9a0187bd54845eae86176a831f..75ef3ad836c45d7481a1de94cf8a737756ef8713 100644 (file)
@@ -186,6 +186,7 @@ const ViewSelector = new Lang.Class({
         params = Params.parse(params, { a11yFocus: null });
 
         let page = new St.Bin({ child: actor,
+                                visible: false,
                                 x_align: St.Align.START,
                                 y_align: St.Align.START,
                                 x_fill: true,
@@ -210,7 +211,7 @@ const ViewSelector = new Lang.Class({
             oldPage.hide();
 
         this.emit('page-empty');
-
+        this._activePage.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
         this._activePage.show();
         Tweener.addTween(this._activePage,
             { opacity: 255,
@@ -281,14 +282,6 @@ const ViewSelector = new Lang.Class({
             return true;
         } else if (this._shouldTriggerSearch(symbol)) {
             this.startSearch(event);
-        } else if (!this._searchActive) {
-            if (symbol == Clutter.Tab || symbol == Clutter.Down) {
-                this._activePage.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
-                return true;
-            } else if (symbol == Clutter.ISO_Left_Tab) {
-                this._activePage.navigate_focus(null, Gtk.DirectionType.TAB_BACKWARD, false);
-                return true;
-            }
         }
         return false;
     },